<!--#include file="../nav/admin_top.php" --> 
<script type="text/javascript">
var url_loglist = '/admin_order/loglist';
var grids_log;
$().ready(function(){
	o2js.build('o2grid');
	grids_log = new o2Grid({
		bind:'grids_log', 
		url:url_loglist,
		imgpath:'/misc/vendors/o2js/o2grid/image',
		cols:[
			{index:'id',mapping:'a.id', name:'序号', width:35,sortable:false, func:function(val,row_index,column_name,json,R){
				 return  '<span title="ID：'+json.id+'" >'+((R.page - 1)*R.rowNum + (row_index+1))+'</span>';
			}}, 
			{index:'logs',mapping:'a.logs', name:'日志', width:610,align:"center",func:function(val,row_index,column_name,json,R){
					return val;
			}
			},
			{index:'created',mapping:'a.created', name:'时间', width:200 ,align:"center"
			}
		],
		baseParams:{
			order_id:{$rs.id}
		}
	});
	grids_log.load(1); 
});
  
</script>
<div class="titleDiv">
	<div class="titleCaption">
		<span class="captionSpan">订单详情 - #{$rs.code}</span>
		<span class="totalSpan"> <label id="captionNum"></label> </span>
	</div>
</div> 
<div  class="button_div">
		<button class=" " onclick="window.close();">关 闭</button>
</div> 
  
<div class="blockdiv">
	<div class="titlediv">订单基本信息</div>
	<table class="mytable" >
  
		<tr>
			<td class="mylabel">订单状态：</td>
			<td class="myinfo" colspan="3" >
				 <?PHP
					if($rs['status'] == '-2'){
						echo   '<span class="gray">系统取消</span>';
					}else if($rs['status'] == '-1'){
						echo  '<span class="gray">用户取消</span>';
					}else if($rs['status'] == '0'){
						echo  '<span class="red">未支付</span>';
					}else if($rs['status'] == '1'){
						echo  '<span class="red">待审核</span>';
					}else if($rs['status'] == '2'){
						echo  '<span class="red">已审核，待生产</span>';
					}else if($rs['status'] == '3'){
						echo  '<span class="red">已生产，待配送</span>';
					}else{
						echo '<span class="green">已配送</span>';
					} 
				 ?>
			</td>  
		</tr> 
		<tr> 
			<td class="mylabel">订单编号：</td>
			<td class="myinfo" >
				 {$rs.code} 
			</td> 
			<td class="mylabel">配送日期：</td>
			<td class="myinfo"  >
				 {$rs.rec_date} 
				 {$rs.sendtime} 
			</td>  
		</tr> 
		<tr>
			<td class="mylabel">商品总价：</td>
			<td class="myinfo"  style="font-size:1em;color:green" >
				 ￥{$rs.price_all} 
			</td>
			<td class="mylabel">运费：</td>
			<td class="myinfo" style="font-size:1em;color:green" >
				 ￥{$rs.price_deliver} 
			</td>  
		</tr> 
		<tr>
			<td class="mylabel">订单总价：</td>
			<td class="myinfo" colspan="3" style="font-size:2em;color:green" >
				 ￥{$rs.price_total} 
			</td>  
		</tr> 
		<tr>
			<td class="mylabel">下单会员：</td>
			<td class="myinfo" style="" >
				 ({$rs.username}){$rs.user_name}
			</td>  
			<td class="mylabel">下单时间：</td>
			<td class="myinfo" style="" >
				  {$rs.created}
			</td>  
		</tr> 
		 
	</table> 
</div> 
<style type="text/css">

/* 账单表格 */
table.goodstb {
border-collapse: collapse;
width: 100%;
font-size: 12px;
color:#333333;
}
table.goodstb td {
background-color: #FFFFFF;
padding:5px;
text-align: center;
vertical-align:top;
border:1px solid #E6E6E6
}
table.goodstb thead th {
background: url("/misc/images/account/ordertbbg.jpg") repeat-x scroll center bottom #FFFFFF;
height:33px;
border: 1px solid #C4D5E0;
color: #000000;
height: 33px;
text-align: center;
}

 
.div_cname{
font-size:14px;
font-weight:bold;
margin-bottom:10px;
}
.div_cvege{
border: 1px dashed #CCCCCC;
color: #006600;
float: left;
margin-bottom: 10px;
margin-right: 10px;
padding: 5px 10px;
}
</style>
<div class="blockdiv">
	<div class="titlediv">订单商品信息</div>
	<div class="margin10">
		<table class="goodstb">
			<thead>
				<tr>
					<th>序号</th>
					<th>商品</th>
					<th>单价</th>
					<th>数量</th>
					<th>小计</th>
				</tr>
			</thead>
			<tbody>
				<?PHP
				$price_total_tmp = 0;
				foreach($rs['order_goods'] as $k=>$v){
					$price_total_tmp += $v['price_total'];
					echo '
				<tr>
					<td>
						'.($k+1).'
					</td>
					<td  style="text-align:left">
						<div class="div_cname">'.$v['combo_name'].'</div>
						<div class="div_citem">';
					foreach($v['order_goods_item'] as $val){
						echo '<div class="div_cvege">'.$val['vege_name'].' '.$val['vege_num'].' 份</div>';
					}
					echo '
							<div class="clear"></div>
						</div>
					</td>
					<td>
						￥'.$v['price'].'
					</td>
					<td>
						'.$v['nums'].'
					</td>
					<td>
						<div class="">￥'.$v['price_total'].'</div>
					</td>
				</tr>
					';
				}
				?>
				<tr>
					<td style="border:0px " colspan="4">
					</td>
					<td style="text-align:center;border:0px;color:red"  >
						 ￥<?PHP echo func::fnDec($price_total_tmp,2); ?>
					</td>
				</tr>
			</tbody>
		</table>
	</div>
</div>

<div class="blockdiv">
	<div class="titlediv">订单日志</div>
	<div class="margin10">
		<div id="grids_log"></div>
	</div>
</div>	
  
<div  class="button_div">
		<button class=" " onclick="window.close();">关 闭</button>
</div> 
<!--#include file="../nav/admin_bottom.php" -->